home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 4: GNU Archives
/
Linux Cubed Series 4 - GNU Archives.iso
/
gnu
/
gawk-3.000
/
gawk-3
/
gawk-3.0.0
/
awklib
/
eg
/
lib
/
nextfile.awk
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1996-01-11
|
388 b
|
16 lines
# nextfile --- skip remaining records in current file
# correctly handle successive occurrences of the same file
# Arnold Robbins, arnold@gnu.ai.mit.edu, Public Domain
# May, 1993
# this should be read in before the "main" awk program
function nextfile() { _abandon_ = FILENAME; next }
_abandon_ == FILENAME {
if (FNR == 1)
_abandon_ = ""
else
next
}